package org.jeecg.modules.bl.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.bl.entity.BlExpenses;
import org.jeecg.modules.bl.entity.BlSubExpenses;
import org.jeecg.modules.bl.vo.BlReceiFeeCountVo;
import org.jeecg.modules.bl.vo.ChgFeeItemVo;
import org.jeecg.modules.bl.vo.RecordMEArrearVo;
import org.springframework.transaction.annotation.Transactional;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;

/**
 * @Description: 计费清单
 * @Author: jeecg-boot
 * @Date:   2022-02-13
 * @Version: V1.0
 */
public interface IBlExpensesService extends IService<BlExpenses> {

	/**
	 * 添加一对多
	 *
	 */
	public void saveMain(BlExpenses blExpenses,List<BlSubExpenses> blSubExpensesList,String waterReadCycle) ;

	/**
	 * 杂项添加一对多
	 *
	 */
	public void saveAlienMain(BlExpenses blExpenses,List<BlSubExpenses> blSubExpensesList) ;

	/**
	 * 修改一对多
	 *
	 */
	public void updateMain(BlExpenses blExpenses,List<BlSubExpenses> blSubExpensesList);
	/**
	 * 杂项修改一对多
	 *
	 */
	public void updateAlienMain(BlExpenses blExpenses,List<BlSubExpenses> blSubExpensesList);

	/**
	 * 删除一对多
	 */
	public void delMain (String id);

	/**
	 * 删除水费明细
	 */
	public void delSubByMainId (String id);

	/**
	 * 删除杂项一对多
	 */
	public Result<?> delAlienMain (String id);

	/**
	 * 批量删除一对多
	 */
	public void delBatchMain (Collection<? extends Serializable> idList);

	@Transactional
	void delAlienBatchMain(Collection<? extends Serializable> idList);

	/***
	 * 查询 抄表、计量、计费、欠费ID
	 * @param recordId
	 * @return
	 */
	List<RecordMEArrearVo>queryRecordMEArrear(String recordId);

    List<ChgFeeItemVo> queryFeeBill(List<String> rdIds, String beginTime, String endTime);

    List<BlReceiFeeCountVo>receivableFeeCount(String financialMonth);
}
